#ifndef _BACKDROP_TEXT_FX_H_
#define _BACKDROP_TEXT_FX_H_

#include "backdrop_sfx.h"
#include "ui/ui_sprite.h"
#include "math/vec2.h"
#include "math/counter.h"

namespace backdrop
{
class BackdropTextFX : public BackgdropSFXSet
{
public:
	struct	TextInst
	{
		ui::UIWidget*		pWidget;
		math::Counter		Life;
		bool				Active;
	};

	BackdropTextFX(camera::AbstractCamera* pCam, BackdropSFX* pParent, const std::string& Image, const std::string& Font, float Time, int	MaxCount, bool Floating = false, bool AutoResize = false);
	virtual ~BackdropTextFX();

	virtual void			Render();
	virtual void			Tick(float dt);
	void					AddText(const std::wstring& Text, const math::Vec2& Pos, const math::Vec2& Size, COLOR Color = 0xFFFFFFFF, bool Centered = false);
	void					AddTextA(const std::string& Text, const math::Vec2& Pos, const math::Vec2& Size, COLOR Color = 0xFFFFFFFF, bool Centered = false);

private:
	bool					m_AutoResize;
	int						m_MaxCount;
	int						m_CurrentCount;
	TextInst*				m_TextA;
	bool					m_Floating;
};
}  // namespace backdrop

#endif // _BACKDROP_TEXT_FX_H_
